package com.ihm.projetihm_v1.nf.synchro;

public class Photo {
	String name;
	String lastModified;
	String url;
	
	public Photo(String name, String lastModified, String url) {
		super();
		this.name = name;
		this.lastModified = lastModified;
		this.url = url;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLastModified() {
		return lastModified;
	}

	public void setLastModified(String lastModified) {
		this.lastModified = lastModified;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	public boolean estPlusRecent(Photo p){
		return Long.parseLong(this.lastModified) > Long.parseLong(p.getLastModified());
	}
	
	public boolean aLeMemeNom(Photo p){
		return this.name.equals(p.getName());
	}
}
